package com.yunyang.sciprt;

import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;

/**
 * Hello world!
 *
 */
public class App 
{
	public void testReadByDoc() throws Exception {
		OutputStream os = new FileOutputStream("doc/res.csv");
		os.write("姓名,电话,邮箱,QQ,公司,对公账号,开户银行,取票机费,普通电影,3D电影,其它电影,退票时间,退票电话,停止售票,影院编码,影院名,影院电话,影院地址\n".getBytes());
		File docPath = new File("doc");
		if(docPath.isDirectory()){
			for (File file : docPath.listFiles()) {
				if(file.getName().endsWith(".docx")){
					new Contact().read(file).writeToCsv(os);
				}
			}
		}
		os.close();
	}
    public static void main( String[] args ) throws Exception
    {
        new App().testReadByDoc();
    }
}
